1. Field of the Invention
The present invention relates to a computer program product, system, and method for selecting pages implementing leaf nodes and internal nodes of a data set index for reuse.
2. Description of the Related Art
A partitioned data set extended (PDSE) is a data set having an index and zero or more members. When adding new data for a new or existing member, the new data is appended sequentially to the end of the PDSE.
The PDSE index may be implemented in a tree data structure where pages allocated to the PDSE data sets are assigned to implement internal nodes and leaf nodes representing the data set index. Each leaf node represents one of the members and provides information on the member that may be used to access the member. Each internal node has one or more child leaf nodes. When a user seeks to access a member, the member name is presented and the tree is traversed to the internal node and leaf node representing the requested member using the member name as the index key. Member data is only loaded into the memory when accessed.
When a data set is opened, the entire data set index is loaded into the memory by assigning pages to implement all the internal and leaf nodes used to represent the entire data set index. A PDSE memory manager may use a Least Recently Used (LRU) algorithm to select pages for internal nodes and leaf nodes to make available for reuse to implement other leaf and internal nodes or store the data for the members in the memory. After internal and leaf nodes are selected for reuse according to the LRU algorithm, if a search of the index reaches a point where there is no page for the internal or leaf node, then the data set memory manager needs to assign a page to the internal and/or leaf nodes the user is trying to access while traversing through the nodes of the data set index.
There is a need in the art for improved techniques for managing pages in memory implementing leaf and internal nodes of a data set index.